// Copyright 2007. Adobe Systems Incorporated. All Rights Reserved.
package fl.controls;

import fl.controls.BaseButton;
import fl.controls.LabelButton;
import fl.controls.ScrollBarDirection;
import fl.core.UIComponent;
import fl.core.InvalidationType;
import fl.events.ComponentEvent;
import fl.events.ScrollEvent;
import flash.display.DisplayObjectContainer;
import flash.display.Sprite;
import flash.events.Event;
import flash.events.MouseEvent;
import flash.events.TimerEvent;
import flash.text.TextField;
import flash.text.TextFormat;
import flash.utils.Timer;

import fl.controls.TextInput;

extern class ScrollBar extends UIComponent {
	public static inline var WIDTH:Float = 15;
	var inDrag:Bool = false;
	var upArrow:BaseButton;
	var downArrow:BaseButton;
	var thumb:LabelButton;
	var track:BaseButton;
	public static function getStyleDefinition():Dynamic;
	static var DOWN_ARROW_STYLES:Dynamic;
	static var THUMB_STYLES:Dynamic;
	static var TRACK_STYLES:Dynamic;
	static var UP_ARROW_STYLES:Dynamic;
	public function new():Void;
	public function setSize(width:Float, height:Float):Void;
	public var width(dynamic, dynamic):Float;
	public var height(dynamic, dynamic):Float;
	public var enabled(dynamic, dynamic):Bool;
	public function setScrollProperties(pageSize:Float, minScrollPosition:Float, maxScrollPosition:Float, pageScrollSize:Float = 0):Void;
	public var scrollPosition(dynamic, dynamic):Float;
	public var minScrollPosition(dynamic, dynamic):Float;
	public var maxScrollPosition(dynamic, dynamic):Float;
	public var pageSize(dynamic, dynamic):Float;
	public var pageScrollSize(dynamic, dynamic):Float;
	public var lineScrollSize(dynamic, dynamic):Float;
	public var direction(dynamic, dynamic):String;
	function configUI():Void;
	function draw():Void;
	function scrollPressHandler(event:ComponentEvent):Void;
	function thumbPressHandler(event:MouseEvent):Void;
	function handleThumbDrag(event:MouseEvent):Void;
	function thumbReleaseHandler(event:MouseEvent):Void;
	public function setScrollPosition(newScrollPosition:Float, fireEvent:Bool = true):Void;
	function setStyles():Void;
	function updateThumb():Void;
}

